package com.ysxsoft.wdg.adapter.center_zy;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ysxsoft.wdg.R;
import com.ysxsoft.wdg.bean.zy.RuleBean;
import com.ysxsoft.wdg.util.ViewUtils;

public class ZyFlRAdapter extends BaseQuickAdapter<RuleBean.SubBean,BaseViewHolder> {


    public ZyFlRAdapter(int layoutResId) {
        super(layoutResId);
    }

    public void clear(){
        getData().clear();
        notifyDataSetChanged();
    }



    @Override
    protected void convert(BaseViewHolder helper, RuleBean.SubBean item) {

        ViewUtils.loadImage(mContext,item.getPic(), (ImageView) helper.getView(R.id.iv_pic));
        helper.setText(R.id.tv_name,item.getTitle());
    }
}
